package com.baizhi.controller;


import com.baizhi.entity.Category;
import com.baizhi.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品三级分类 前端控制器
 * </p>
 *
 * @author haiyu
 * @since 2021-09-16
 */
@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    public ICategoryService ic;

    @GetMapping("/selectTree")
    public List<Category> selectTree(){
        List<Category> categories = ic.selectTree();
        return  categories;
    }
}

